/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hva.web.mvcwebapp.models;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Thijs
 */
@Entity
@Table(name = "uploadedassignments")
public class UploadedAssignments implements Serializable {
    
    @Id
    @GeneratedValue
    @Column(name = "uploadedassignmentsid")
    private int uploadedassignmentid;
    @Column(name = "uploadedassignmentsdescription", length=10000)
    private String uploadedassignmentdescription;
    @Column(name = "documentpath")
    private String documentpath;
    @Column(name = "approved")
    private int approved;
    @ManyToOne
    private User user;
     @ManyToOne
    private Chapter chapter;
    
    @ManyToOne
    private UploadAssignment uploadassignment;
    
    @OneToMany
        private Set<AssignmentFeedback> feedback = new HashSet<AssignmentFeedback>() {
    };
    

    public UploadedAssignments() {
    }


    /**
     * @return the documentpath
     */
    public String getDocumentpath() {
        return documentpath;
    }

    /**
     * @param documentpath the documentpath to set
     */
    public void setDocumentpath(String documentpath) {
        this.documentpath = documentpath;
    }

    /**
     * @return the approved
     */
    public int getApproved() {
        return approved;
    }

    /**
     * @param approved the approved to set
     */
    public void setApproved(int approved) {
        this.approved = approved;
    }

    /**
     * @return the user
     */
    public User getUser() {
        return user;
    }

    /**
     * @param user the user to set
     */
    public void setUser(User user) {
        this.user = user;
    }

    /**
     * @return the feedback
     */
    public Set<AssignmentFeedback> getFeedback() {
        return feedback;
    }

    /**
     * @param feedback the feedback to set
     */
    public void setFeedback(Set<AssignmentFeedback> feedback) {
        this.feedback = feedback;
    }

    /**
     * @return the uploadassignment
     */
    public UploadAssignment getUploadassignment() {
        return uploadassignment;
    }

    /**
     * @param uploadassignment the uploadassignment to set
     */
    public void setUploadassignment(UploadAssignment uploadassignment) {
        this.uploadassignment = uploadassignment;
    }

    /**
     * @return the uploadedassignmentdescription
     */
    public String getUploadedassignmentdescription() {
        return uploadedassignmentdescription;
    }

    /**
     * @param uploadedassignmentdescription the uploadedassignmentdescription to set
     */
    public void setUploadedassignmentdescription(String uploadedassignmentdescription) {
        this.uploadedassignmentdescription = uploadedassignmentdescription;
    }

    /**
     * @return the uploadedassignmentid
     */
    public int getUploadedassignmentid() {
        return uploadedassignmentid;
    }

    /**
     * @param uploadedassignmentid the uploadedassignmentid to set
     */
    public void setUploadedassignmentid(int uploadedassignmentid) {
        this.uploadedassignmentid = uploadedassignmentid;
    }

    /**
     * @return the chapter
     */
    public Chapter getChapter() {
        return chapter;
    }

    /**
     * @param chapter the chapter to set
     */
    public void setChapter(Chapter chapter) {
        this.chapter = chapter;
    }

    
}
